<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Document</title>
    <link rel="stylesheet" href="../css/api.css">
    <link rel="stylesheet" href="../css/news.css">
    <link rel="stylesheet" href="../css/base_icon.css">
    <link rel="stylesheet" href="../css/footer.css">
</head>

<body>
    <div id="view" v-cloak>
        <header>
            <ul class="h-wrap">
                <!-- 第二个头部 -->
                <li class="h-list ">
                    <div class="two flex-bt">
                        <div class="flex-c left new-nav">
                            <div class="litem active n-list" onclick="randomSwitchBtn(0)">同城</div>
                            <div class="litem n-list" onclick="randomSwitchBtn(1)">全部</div>
                            <div class="litem n-list" onclick="randomSwitchBtn(2)">关注</div>
                        </div>
                        <img style="height: 30px;" src="../image/dynamic/ms_top_notice_icon_n.png" onclick="_url({ url: 'frame2/dy_list', title: '动态通知' })" alt="">
                    </div>
                </li>
            </ul>
        </header>
        <!-- 脚部 -->
        <footer>
            <ul class="f-wrap flex">
                <li class="f-list " onclick="_index(0)">
                    <img src="../image/index_images/button1.png" alt="">
                    <span>缘分</span>
                </li>
                <li class="f-list active">
                    <img src="../image/index_images/button02.png" alt="">
                    <span>动态</span>
                </li>
                <li class="f-list" onclick="_index(2)">
                    <img src="../image/index_images/button3.png" alt="">
                    <span>聊天</span>
                    <span class="num new-hide"></span>
                </li>
                <li class="f-list" onclick="_index(4)">
                    <img src="../image/index_images/button5.png" alt="">
                    <span>我</span>
                </li>
            </ul>
        </footer>
    </div>
</body>
<script src="../script/jquery.js"></script>
<script src="../script/api.js"></script>
<script src="../script/ffkj.js"></script>
<script src="../script/vue.js"></script>
<script src="../script/group.js"></script>
<script>
    var view = new Vue({
        el: '#view',
        data: {
            ios: 1, // 1上架 0非上架
            index: 0
        }
    })
    apiready = function() {
        view.ios = $api.getStorage('shang');
        $api.fixStatusBar($api.dom('header'));
        $api.fixTabBar($api.dom('footer'));
        _heibai(1)
        keyback();

        // 监听消息数量
        _listener('msgNum', function(ret) {
            if (ret && ret.value) {
                var result = ret.value;
                changeMsgNum(result)
            }
        })
        changeMsgNum();

        var h = $api.offset($api.dom('header')).h;
        var fh = $api.offset($api.dom('footer')).h;
        var pageParam = [];
        for (var i = 0; i < 3; i++) {
            var obj = {
                index: i + 1,
            }
            pageParam.push(obj);
        }
        groupInit('litem', ['frame1', 'frame1', 'frame1'], h, fh, 0, '.litem', pageParam, {
            pre: 1,
            scrollEnabled: false
        });

        // 弹窗消息
        _listener('newmsg', function(ret) {
            showMsgFrm(ret.value.data)
        })
    }

    function randomSwitchBtn(index) {
        api.setFrameGroupIndex({
            name: 'litem',
            index: index,
            scroll: false, //是否平滑滚动至目标窗口，即是否带有动画
            reload: false, // 刷新
        });
    }
</script>

</html>